package com.jyhg.ane
{
	import com.distriqt.extension.application.Application;
	import com.jyhg.core.mobile.ANEdistriqt;
	
	/**
	 * ApplicationInfo
	 * @author: Jonny.Hong
	 * @date: 2014-2-26
	 */
	public class UDID
	{
		public function UDID()
		{
			Application.init(ANEdistriqt.DEV_KEY);
		}
		
		/**
		 *获取udid android / ios通用 
		 * @return 
		 * 
		 */
		public static function getUDID():String
		{
			if(!Application.isSupported)
			{
				trace("udid获取错误");
				throw new Error("udid获取错误");
			}
			return Application.service.device.uniqueId();
		}
		
		public static function getAndroidUDID():String
		{
			return getUDID();
		}
		
		public static function getIosUDID():String
		{
			return getUDID();
		}
	}
}